package com.lee.boot.head.first.demo.entity;


import com.alibaba.fastjson.annotation.JSONField;


import javax.persistence.*;
import java.io.Serializable;

/**
 * @Auther: Lee
 * @Date: 2018/4/27 16:23
 * @Description: jpa似乎与mybatisplus冲突，暂时注释jpa
 */
@Entity
@Table(name = "user")
public class UserEntity extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    //注意注意！！！ id用这个注解，不要用spring-data的那个id

    @Id
    @Column(name = "id")
    private Long id;

    @Column(name = "name")
    private String name;

    @Column(name = "age")
    private Integer age;

    @Column(name = "sex")
    private String sex;

    @Column(name = "hobby")
    private String hobby;

    @Column(name = "username")
    private String username;

    @Column(name = "password")
    @JSONField(serialize = false)
    private String password;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getHobby() {
        return hobby;
    }

    public void setHobby(String hobby) {
        this.hobby = hobby;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
}
